Optimal. Leaf size=149 \[ \frac {a^2 (7 A+8 B+12 C) \sin (c+d x)}{6 d}+\frac {a^2 (7 A+8 B+12 C) \sin (c+d x) \cos (c+d x)}{24 d}+\frac {1}{8} a^2 x (7 A+8 B+12 C)+\frac {(A+2 B) \sin (c+d x) \cos ^2(c+d x) (a \sec (c+d x)+a)^2}{6 d}+\frac {A \sin (c+d x) \cos ^3(c+d x) (a \sec (c+d x)+a)^2}{4 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.33, antiderivative size = 149, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, integrand size = 41, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.146, Rules used = {4086, 4013, 3788, 2637, 4045, 8} \[ \frac {a^2 (7 A+8 B+12 C) \sin (c+d x)}{6 d}+\frac {a^2 (7 A+8 B+12 C) \sin (c+d x) \cos (c+d x)}{24 d}+\frac {1}{8} a^2 x (7 A+8 B+12 C)+\frac {(A+2 B) \sin (c+d x) \cos ^2(c+d x) (a \sec (c+d x)+a)^2}{6 d}+\frac {A \sin (c+d x) \cos ^3(c+d x) (a \sec (c+d x)+a)^2}{4 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 2637
Rule 3788
Rule 4013
Rule 4045
Rule 4086
Rubi steps
\begin {align*} \int \cos ^4(c+d x) (a+a \sec (c+d x))^2 \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx &=\frac {A \cos ^3(c+d x) (a+a \sec (c+d x))^2 \sin (c+d x)}{4 d}+\frac {\int \cos ^3(c+d x) (a+a \sec (c+d x))^2 (2 a (A+2 B)+a (A+4 C) \sec (c+d x)) \, dx}{4 a}\\ &=\frac {(A+2 B) \cos ^2(c+d x) (a+a \sec (c+d x))^2 \sin (c+d x)}{6 d}+\frac {A \cos ^3(c+d x) (a+a \sec (c+d x))^2 \sin (c+d x)}{4 d}+\frac {1}{12} (7 A+8 B+12 C) \int \cos ^2(c+d x) (a+a \sec (c+d x))^2 \, dx\\ &=\frac {(A+2 B) \cos ^2(c+d x) (a+a \sec (c+d x))^2 \sin (c+d x)}{6 d}+\frac {A \cos ^3(c+d x) (a+a \sec (c+d x))^2 \sin (c+d x)}{4 d}+\frac {1}{12} (7 A+8 B+12 C) \int \cos ^2(c+d x) \left (a^2+a^2 \sec ^2(c+d x)\right ) \, dx+\frac {1}{6} \left (a^2 (7 A+8 B+12 C)\right ) \int \cos (c+d x) \, dx\\ &=\frac {a^2 (7 A+8 B+12 C) \sin (c+d x)}{6 d}+\frac {a^2 (7 A+8 B+12 C) \cos (c+d x) \sin (c+d x)}{24 d}+\frac {(A+2 B) \cos ^2(c+d x) (a+a \sec (c+d x))^2 \sin (c+d x)}{6 d}+\frac {A \cos ^3(c+d x) (a+a \sec (c+d x))^2 \sin (c+d x)}{4 d}+\frac {1}{8} \left (a^2 (7 A+8 B+12 C)\right ) \int 1 \, dx\\ &=\frac {1}{8} a^2 (7 A+8 B+12 C) x+\frac {a^2 (7 A+8 B+12 C) \sin (c+d x)}{6 d}+\frac {a^2 (7 A+8 B+12 C) \cos (c+d x) \sin (c+d x)}{24 d}+\frac {(A+2 B) \cos ^2(c+d x) (a+a \sec (c+d x))^2 \sin (c+d x)}{6 d}+\frac {A \cos ^3(c+d x) (a+a \sec (c+d x))^2 \sin (c+d x)}{4 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.34, size = 95, normalized size = 0.64 \[ \frac {a^2 (24 (6 A+7 B+8 C) \sin (c+d x)+24 (2 A+2 B+C) \sin (2 (c+d x))+16 A \sin (3 (c+d x))+3 A \sin (4 (c+d x))+84 A d x+8 B \sin (3 (c+d x))+96 B d x+144 C d x)}{96 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.44, size = 99, normalized size = 0.66 \[ \frac {3 \, {\left (7 \, A + 8 \, B + 12 \, C\right )} a^{2} d x + {\left (6 \, A a^{2} \cos \left (d x + c\right )^{3} + 8 \, {\left (2 \, A + B\right )} a^{2} \cos \left (d x + c\right )^{2} + 3 \, {\left (7 \, A + 8 \, B + 4 \, C\right )} a^{2} \cos \left (d x + c\right ) + 8 \, {\left (4 \, A + 5 \, B + 6 \, C\right )} a^{2}\right )} \sin \left (d x + c\right )}{24 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.25, size = 248, normalized size = 1.66 \[ \frac {3 \, {\left (7 \, A a^{2} + 8 \, B a^{2} + 12 \, C a^{2}\right )} {\left (d x + c\right )} + \frac {2 \, {\left (21 \, A a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 24 \, B a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 36 \, C a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 77 \, A a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 88 \, B a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 132 \, C a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 83 \, A a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 136 \, B a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 156 \, C a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 75 \, A a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 72 \, B a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 60 \, C a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{4}}}{24 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 1.53, size = 203, normalized size = 1.36 \[ \frac {a^{2} A \left (\frac {\left (\cos ^{3}\left (d x +c \right )+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )+\frac {2 a^{2} A \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{3}+\frac {B \,a^{2} \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{3}+a^{2} A \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+2 B \,a^{2} \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+a^{2} C \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+B \,a^{2} \sin \left (d x +c \right )+2 a^{2} C \sin \left (d x +c \right )+a^{2} C \left (d x +c \right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.41, size = 190, normalized size = 1.28 \[ -\frac {64 \, {\left (\sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )} A a^{2} - 3 \, {\left (12 \, d x + 12 \, c + \sin \left (4 \, d x + 4 \, c\right ) + 8 \, \sin \left (2 \, d x + 2 \, c\right )\right )} A a^{2} - 24 \, {\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} A a^{2} + 32 \, {\left (\sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )} B a^{2} - 48 \, {\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} B a^{2} - 24 \, {\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} C a^{2} - 96 \, {\left (d x + c\right )} C a^{2} - 96 \, B a^{2} \sin \left (d x + c\right ) - 192 \, C a^{2} \sin \left (d x + c\right )}{96 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 3.10, size = 174, normalized size = 1.17 \[ \frac {7\,A\,a^2\,x}{8}+B\,a^2\,x+\frac {3\,C\,a^2\,x}{2}+\frac {3\,A\,a^2\,\sin \left (c+d\,x\right )}{2\,d}+\frac {7\,B\,a^2\,\sin \left (c+d\,x\right )}{4\,d}+\frac {2\,C\,a^2\,\sin \left (c+d\,x\right )}{d}+\frac {A\,a^2\,\sin \left (2\,c+2\,d\,x\right )}{2\,d}+\frac {A\,a^2\,\sin \left (3\,c+3\,d\,x\right )}{6\,d}+\frac {A\,a^2\,\sin \left (4\,c+4\,d\,x\right )}{32\,d}+\frac {B\,a^2\,\sin \left (2\,c+2\,d\,x\right )}{2\,d}+\frac {B\,a^2\,\sin \left (3\,c+3\,d\,x\right )}{12\,d}+\frac {C\,a^2\,\sin \left (2\,c+2\,d\,x\right )}{4\,d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________